package com.happystreet.engine
{
	import com.greensock.TweenLite;
	import com.greensock.easing.Back;
	import com.happystreet.CustomDisplayEffects;
	import com.happystreet.GlobalGameConstants;
	import com.happystreet.config.GameConfig;
	import com.happystreet.config.ItemsConfig;
	import com.happystreet.config.ShopsConfig;
	import com.happystreet.config.TextConfig;
	import com.happystreet.info.ItemInfo;
	import com.happystreet.info.WallInfo;
	import com.happystreet.manager.GameManager;
	import com.happystreet.manager.SoundManager;
	import com.happystreet.manager.StreetManager;
	import com.happystreet.manager.TrucksManager;
	import com.happystreet.manager.TutorialManager;
	import com.happystreet.rpc.RpcClient;
	import com.happystreet.types.TruckTypes;
	import com.happystreet.ui.BeautyBar;
	import com.happystreet.ui.BuildAShopPopup;
	import com.happystreet.ui.CoreButton;
	import com.happystreet.ui.CorePopup;
	import com.happystreet.ui.CoreProgressBar;
	import com.happystreet.ui.FocusArrow;
	import com.happystreet.ui.JobsRewardsList;
	import com.happystreet.ui.SimpleMessagePopup;
	import com.happystreet.ui.StatusBar;
	import com.happystreet.utils.DataUtils;
	
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.events.TimerEvent;
	import flash.filters.BitmapFilter;
	import flash.filters.BitmapFilterQuality;
	import flash.filters.DropShadowFilter;
	import flash.text.TextField;
	import flash.utils.Timer;
	
	public class CoreShop extends CoreObject 
	{
		
		public static const CLICK_TO_BUILD_SHOP_STATUS:int = 0;
		public static const BUILD_START_SHOP_STATUS:int = 1;
		public static const BUILD_IN_PROGRESS_SHOP_STATUS:int = 2;
		public static const INSTANT_BUILD_IN_PROGRESS_SHOP_STATUS:int = 9;
		public static const CLICK_TO_OPEN_BUILT_SHOP_STATUS:int = 3;
		public static const WORKING_SHOP_STATUS:int = 4;
		public static const UPGRADE_IN_PROGRESS_SHOP_STATUS:int = 5;
		public static const INSTANT_UPGRADE_IN_PROGRESS_SHOP_STATUS:int = 8;
		public static const CLICK_TO_OPEN_UPGRADED_SHOP_STATUS:int = 6;
		public static const VISITED_SHOP:int = 7;
		public static const ORDER_NONE:int = 0;
		public static const ORDER_PROGRESS:int = 1;
		public static const ORDER_ARRIVING:int = 2;
		public static const ORDER_COMPLETE:int = 3;
		public static const ORDER_RECEIVED:int = 4;
		public static const ORDER_PENDING:int = 5;
		private static const BUILD_TYPE_UPDATE:String = "updateType";
		private static const BUILD_TYPE_BUILD:String = "buildType";
		private static const BUILD_TYPE_SIZE_UPGRADE:String = "sizeUpgradeType";
		
		private var clickToOpen:CoreObject;
		private var rpcClient:RpcClient;
		private var _status:int;
		public var trucksManager:TrucksManager;
		private var shopBaseWidth:int;
		private var _orderStatus:int;
		private var itemHitArea:Sprite;
		public var needSave:Boolean;
		public var shopPosition:int;
		public var deliveryRemainingTime:int;
		private var gameManager:GameManager;
		private var flipItemId:int;
		public var workingShopLayoutContent:Array;
		public var previousOrderStatus:int;
		public var infoArea:CoreObject;
		public var beautyLevel:int;
		public var roofPosX:Number;
		public var roofPosY:Number;
		public var beauty:int;
		public var itemsList:Array;
		public var workingBeautyLevel:int;
		private var buildTf:TextField;
		private var buildSpot:CoreSpot;
		public var constructionRemainingTime:int;
		private var orderTimer:Timer;
		public var deliveryTotalTime:int;
		public var doorsPosX:Array;
		private var shopArrow:FocusArrow;
		public var likesCount:int;
		public var shopLayout:Object;
		private var buildBar:CoreProgressBar;
		public var floorList:Array;
		private var hasInstantBuildPending:Boolean = false;
		public var roof:CoreObject;
		public var roofScale:Number;
		public var deliveryAnimationTime:Number;
		public var hasPendingInstantDeliveryRequest:Boolean;
		public var rewardsList:JobsRewardsList = null;
		public var displayIndexOffset:int;
		private var walls:CoreObject;
		public var beautyBar:BeautyBar;
		public var dataIndexOffset:int;
		public var deliveryOrderedGoods:Object;
		private var flipButton:CoreButton;
		
		public function CoreShop(position:int)
		{
			this.floorList = new Array();
			this.itemsList = new Array();
			super(null);
			this.shopPosition = position;
			this.flipButton = new CoreButton("FlipArrows");
			this.flipButton.registerHandlers(this.flipItem);
			this.flipButton.setClickSound(SoundManager.BTN_CLICK_4);
			this.flipButton.activateButton();
			//this.flipButton.createTooltip(TextConfig.getText("ToolTipFlipItem"));
			this.itemHitArea = new Sprite();
			this.itemHitArea.mouseEnabled = false;
			this.itemHitArea.mouseChildren = false;
			this.infoArea = new CoreObject();
			this.trucksManager = new TrucksManager(this);
			this.beautyBar = new BeautyBar();
			this.beautyBar.scale = 0.9;
			this.doorsPosX = new Array();
			this.gameManager = GameManager.getInstance();
			this.rpcClient = RpcClient.getInstance();
			this.workingBeautyLevel = -1;
			this.name = (this.name + "_CoreShop");
		}
		
		public function flipItem():void
		{
			this.itemsList[this.flipItemId].flipItem();
		}
		
		public function set buildStatus(status:int):void
		{
			this._status = status;
			BottomPanel.updateShopStatus(this.shopPosition);
			if (StatusBar.instance == null)
			{
				return;
			}
			StatusBar.instance.updateTruckAt(this.shopPosition);
		}
		
		public function get buildStatus():int
		{
			return this._status;
		}
		
		public function buildShop(_arg1:Boolean=true, _arg2:Boolean=false, _arg3:Boolean=false):void
		{
			var shopItem:ShopItem;
			this.shopLayout = GameConfig.streetData[this.shopPosition];
			this.gameManager.addEventListener(GameManager.DISPLAY_POPUP, this.deactivateShop, false, 0, true);
			this.gameManager.addEventListener(GameManager.REMOVE_POPUP, this.activateShop, false, 0, true);
			
			if(GameConfig.gameMode==GlobalGameConstants.VISIT_STREET_GAMEMODE){
				this.buildStatus = VISITED_SHOP;
				this.buildShopElements();
			}else{
				if (!GameConfig.shopData[this.shopPosition])
				{
					this.buildStatus = CLICK_TO_BUILD_SHOP_STATUS;
					this.setBuildSpot();
					this.setClickState();
				}
				else
				{
					this.updateBuildStatus();
					this.updateOrderStatus(_arg1, _arg2);
					this.updateFriendDeliveryStatus(true);
					this.updateRescueTruck(true);
					if (this.buildStatus > CLICK_TO_OPEN_BUILT_SHOP_STATUS)
					{
						this.buildShopElements();
						this.showShop();
					}
					else
					{
						this.setBuildSpot();
					}
					this.setClickState();
				}
			}
		}
		
		public function updateBuildStatus(type:String="updateType"):void
		{
			var _local2:int;
			var _local3:int;
			var _local4:int;
			if (GameConfig.shopData[this.shopPosition] && !(this.buildStatus == VISITED_SHOP))
			{
				if (GameConfig.shopData[this.shopPosition].shopIsOpen == 0)
				{
					if (type == BUILD_TYPE_SIZE_UPGRADE)
					{
						_local4 = CoreProgressBar.UPGRADESIZE_PROGRESS_TYPE;
						GameConfig.shopData[this.shopPosition].upgradeProgress = 0;
						_local3 = ShopsConfig.getSizeUpgradeDuration(this.shopLayout.type, this.shopLayout.level);
						_local2 = 0;
						this.constructionRemainingTime = _local3;
					}
					else
					{
						if (type == BUILD_TYPE_BUILD)
						{
							_local4 = CoreProgressBar.BUILDING_PROGRESS_TYPE;
							GameConfig.shopData[this.shopPosition].buildProgress = 0;
							_local3 = ShopsConfig.getBuildDurationByType(this.shopLayout.type);
							_local2 = 0;
							this.constructionRemainingTime = _local3;
						}
						else
						{
							if (GameConfig.shopData[this.shopPosition].hasOwnProperty("upgradeProgress"))
							{
								_local4 = CoreProgressBar.UPGRADESIZE_PROGRESS_TYPE;
								_local3 = ShopsConfig.getSizeUpgradeDuration(this.shopLayout.type, this.shopLayout.level);
								_local2 = ((GameConfig.shopData[this.shopPosition].hasOwnProperty("instant_shop_size_upgrade")) ? _local3 : GameConfig.shopData[this.shopPosition].upgradeProgress);
							}
							else
							{
								if (GameConfig.shopData[this.shopPosition].hasOwnProperty("buildProgress"))
								{
									_local4 = CoreProgressBar.BUILDING_PROGRESS_TYPE;
									_local3 = ShopsConfig.getBuildDurationByType(this.shopLayout.type);
									_local2 = GameConfig.shopData[this.shopPosition].buildProgress;
								}
							}
						}
					}
					if (_local2 < _local3)
					{
						switch (_local4)
						{
							case CoreProgressBar.BUILDING_PROGRESS_TYPE:
								this.buildStatus = BUILD_IN_PROGRESS_SHOP_STATUS;
								break;
							case CoreProgressBar.UPGRADESIZE_PROGRESS_TYPE:
								this.buildStatus = UPGRADE_IN_PROGRESS_SHOP_STATUS;
								break;
						}
						if (type == BUILD_TYPE_UPDATE)
						{
							this.trucksManager.pushTruck(TruckTypes.BUILD, this.buildStatus);
							if (!this.buildBar)
							{
								this.buildBar = new CoreProgressBar();
								this.buildBar.initBar(_local4, this, _local2, _local3, this.buildProgressComplete);
							}
						}
						else
						{
							this.trucksManager.pushTruck(TruckTypes.BUILD, BUILD_START_SHOP_STATUS);
							this.buildBar = new CoreProgressBar();
							this.buildBar.initBar(_local4, this, _local2, _local3, this.buildProgressComplete);
						}
						this.trucksManager.updateTruck(TruckTypes.BUILD);
					}
					else
					{
						switch (_local4)
						{
							case CoreProgressBar.BUILDING_PROGRESS_TYPE:
								this.buildStatus = CLICK_TO_OPEN_BUILT_SHOP_STATUS;
								break;
							case CoreProgressBar.UPGRADESIZE_PROGRESS_TYPE:
								this.buildStatus = CLICK_TO_OPEN_UPGRADED_SHOP_STATUS;
								break;
						}
						this.trucksManager.pushTruck(TruckTypes.BUILD, this.buildStatus);
						this.trucksManager.updateTruck(TruckTypes.BUILD);
					}
				}
				else
				{
					this.buildStatus = WORKING_SHOP_STATUS;
					if (type == BUILD_TYPE_UPDATE)
					{
						this.trucksManager.updateTruck(TruckTypes.BUILD, this.buildStatus);
					}
				}
			}
		}
		
		public function updateOrderStatus(_arg1:Boolean=false, _arg2:Boolean=false, _arg3:Boolean=false):void
		{
			
		}
		
		public function updateFriendDeliveryStatus(_arg1:Boolean=false):void
		{
			
		}
		
		public function updateRescueTruck(_arg1:Boolean=false):void
		{
			
		}
		
		public function setClickState(_arg1:Truck=null):void
		{
			if (!this.shopArrow)
			{
				this.shopArrow = new FocusArrow();
				this.shopArrow.setArrowReferrer(this);
			}
			switch (this.buildStatus)
			{
				case CLICK_TO_BUILD_SHOP_STATUS:
					//this.shopArrow.showArrow(TextConfig.getText("StatusBarEmptyLocationMessage"), 180, 0.8);
					this.shopArrow.mouseChildren = false;
					this.shopArrow.mouseEnabled = false;
					return;
				case CLICK_TO_OPEN_BUILT_SHOP_STATUS:
				case CLICK_TO_OPEN_UPGRADED_SHOP_STATUS:
					this.shopArrow.showArrow(TextConfig.getText("MessageOpenShop"), 160);
					this.addEventListener(MouseEvent.MOUSE_DOWN, this.openShop, false, 0, true);
					this.shopArrow.addEventListener(MouseEvent.MOUSE_DOWN, this.openShop, false, 0, true);
					this.shopArrow.mouseChildren = true;
					this.shopArrow.mouseEnabled = true;
					return;
				case WORKING_SHOP_STATUS:
					_arg1 = (((_arg1)==null) ? this.trucksManager.getCurrentTruck() : _arg1);
					if (_arg1 == null) break;
					this.shopArrow.mouseEnabled = true;
					this.shopArrow.mouseChildren = true;
					this.shopArrow.addEventListener(MouseEvent.MOUSE_DOWN, this.receiveOrder, false, 0, true);
					if ((((_arg1.currentAnimState == Truck.TRUCK_WAIT)) || ((_arg1.currentAnimState == Truck.TRUCK_ARRIVING))))
					{
						switch (_arg1.subType)
						{
							case TruckTypes.SUBTYPE_FRIEND_DELIVERY:
								this.shopArrow.showArrow(TextConfig.getText("MessageTakeDelivery"), (_arg1.height + 50));
								break;
							case TruckTypes.SUBTYPE_RESCUE_DELIVERY:
								this.shopArrow.showArrow(TextConfig.getText("MessageTakeDelivery"), _arg1.height);
								break;
							default:
								this.shopArrow.showArrow(TextConfig.getText("MessageTakeDelivery"), (_arg1.height + 100));
						}
					}
					return;
			}
		}
		
		public function openShop(event:MouseEvent=null):void
		{
			
		}
		
		public function receiveOrder(event:MouseEvent=null):void
		{
			
		}
		
		public function setBuildSpot(_arg1:Boolean=false):void
		{
			if (!this.buildSpot && !_arg1)
			{
				this.buildSpot = new CoreSpot("BuildAShop");
				this.add(this.buildSpot);
			}
			else
			{
				if (_arg1)
				{
					this.remove(this.buildSpot);
				}
			}
			this.createShopArea(true);
		}
		/**
		 *停用商店 
		 * @param event
		 * 
		 */		
		private function deactivateShop(event:Event):void
		{
			
		}
		/**
		 *激活商店 
		 * @param event
		 * 
		 */		
		private function activateShop(event:Event):void
		{
			
		}
		/**
		 *构建商店元素 
		 * 
		 */		
		private function buildShopElements():void
		{
			this.shopBaseWidth = GameConfig.getShopLayout(this.shopLayout.level)[0];
			this.buildWalls(this.getWallData(this.shopLayout.content));
			this.buildRoof(this.getRoofData(this.shopLayout.content));
			this.createShopArea();
			this.setOffsets();
			this.placeItems();
			this.setDoors();
			this.getItemMoneyExpense();
			this.beautyBar.initBar();
		}
		
		/**
		 *获取墙壁数据 
		 * @param content
		 * @return 
		 * 
		 */		
		public function getWallData(content:Array):Array
		{
			var wallDataList:Array = new Array();
			var wall:Array = new Array();
			for each (wall in content)
			{
				switch (wall[0])
				{
					case GlobalGameConstants.WALL_SHAPE_TYPE:
						wallDataList.push(wall);
						break;
				}
			}
			return wallDataList;
		}
		/**
		 *获取房顶数据 
		 * @param content
		 * @return 
		 * 
		 */		
		private function getRoofData(content:Object):int
		{
			var roofData:int;
			var roof:Array = new Array();
			for each (roof in content)
			{
				switch (roof[0])
				{
					case GlobalGameConstants.ROOF_TYPE:
						roofData = roof[1];
						break;
				}
			}
			return roofData;
		}
		/**
		 *拆墙 
		 * 
		 */		
		private function demolishWalls():void
		{
			while (this.floorList.length > 0)
			{
				remove(this.floorList[0]);
				this.floorList.shift();
			}
			this.remove(this.walls);
		}
		
		/**
		 *构建墙壁 
		 * @param wallData
		 * 
		 */		
		public function buildWalls(wallData:Array):void
		{
			var wallDataList:Array;
			var shopWall:ShopWall;
			var wallID:uint;
			var wallID_1:uint;
			var sName:String;
			var wallInfo:WallInfo;
			this.demolishWalls();
			this.walls = new CoreObject();
			var _local2:BitmapFilter = new DropShadowFilter(0, 0, 4141070, 1, 6, 6, 50, BitmapFilterQuality.LOW, false, false);
			for each (wallDataList in wallData)
			{
				shopWall = new ShopWall();
				wallID = wallDataList[1];
				wallID_1 = wallDataList[2];
				if (ItemsConfig.getItemInfo(wallID_1, "type left wall", String(("shop position " + this.shopPosition))))
				{
					sName = ItemsConfig.getItemInfo(wallID_1, "type left wall", String(("shop position " + this.shopPosition))).symbolName;
					wallInfo = WallInfo(ItemsConfig.getItemInfo(wallID, "type right wall", String(("shop position " + this.shopPosition))));
					shopWall.buildWall(wallInfo, this.shopLayout.level, this.floorList, sName);
					this.walls.add(shopWall);
				}
			}
			this.add(this.walls);
			setChildIndex(this.walls, 0);
		}
		
		
		/**
		 *构建屋顶 
		 * @param data
		 * 
		 */		
		public function buildRoof(data:int):void
		{
			var info:ItemInfo = ItemsConfig.getItemInfo(data, "type roof", String(("shop position " + this.shopPosition)));
			if (!info)
			{
				return;
			}
			remove(this.roof);
			this.roof = new CoreObject(info.symbolName);
			this.placeRoof();
			this.add(this.roof);
			setChildIndex(this.roof, 1);
		}
		/**
		 *摆放屋顶 
		 * 
		 */		
		public function placeRoof():void
		{
			var _local1:Number = this.floorList[(this.floorList.length - 1)].wallTopWidth;
			this.roofPosX = this.floorList[(this.floorList.length - 1)].wallTopPosX;
			this.roofScale = (_local1 / GameConfig.SHOP_ROOF_BASE_WIDTH);
			this.roofPosY = ((GameConfig.SHOP_WALL_HEIGHT * this.floorList.length) + (GameConfig.SHOP_ROOF_BASE_HEIGHT * this.roofScale));
			this.roof.alignTo(this.roofPosX, -(this.roofPosY));
			this.roof.scaleX = this.roofScale;
			this.roof.scaleY = this.roofScale;
		}
		
		public function saveItem(item:ShopItem):void
		{
			
		}
		
		/**
		 *创建商店模型 
		 * @param activate
		 * 
		 */		
		public function createShopArea(activate:Boolean=false):void
		{
			var shopWall:ShopWall;
			this.infoArea.graphics.clear();
			this.infoArea.graphics.beginFill(0xFF00, GameConfig.HIT_AREA_ALPHA);
			this.roofPosY = (((this.roofPosY)>0) ? this.roofPosY : 220);
			var posX:Number = 0;
			var posY:Number = 0;
			for each (shopWall in this.floorList)
			{
				posX = Math.min(shopWall.wallLeftBound, posX);
				posY = Math.max(shopWall.wallRightBound, posY);
			}
			posX = (posX<0) ? posX : -100;
			posY = (posY>0) ? posY : 100;
			this.infoArea.graphics.drawRect(posX, -(this.roofPosY), (posY - posX), this.roofPosY);
			this.infoArea.graphics.endFill();
			this.infoArea.mouseChildren = true;
			this.infoArea.mouseEnabled = true;
			this.infoArea.buttonMode = true;
			if (activate)
			{
				this.activateShopInfos();
			}
		}
		
		public function activateShopInfos():void
		{
			if (this.infoArea)
			{
				this.add(this.infoArea);
				this.infoArea.addEventListener(MouseEvent.MOUSE_OVER, this.onShopRollOver, false, 0, true);
				this.infoArea.addEventListener(MouseEvent.MOUSE_OUT, this.removeShopInfos, false, 0, true);
			}
		}
		
		private function onShopRollOver(event:MouseEvent):void
		{
			
		}
		
		private function removeShopInfos(event:MouseEvent):void
		{
			
		}
		
		private function setOffsets():void
		{
			this.displayIndexOffset = this.numChildren;
			this.dataIndexOffset = (this.floorList.length + 1);
		}
		
		private function placeItems():void
		{
			var _local1:Array;
			var shopItem:ShopItem;
			var itemInfo:ItemInfo;
			for each (_local1 in this.shopLayout.content)
			{
				if (_local1[0] > 5)
				{
					shopItem = new ShopItem(null, false);
					this.itemsList.push(shopItem);
					itemInfo = ItemsConfig.getItemInfo(_local1[1], String(("type " + _local1[0])), String(("shop position " + this.shopPosition)));
					shopItem.setItemConfig(itemInfo);
					shopItem.setShopReference(this.shopPosition, false);
					switch (_local1[0])
					{
						case GlobalGameConstants.DOOR_TYPE:
							shopItem.alignTo(_local1[2], 0, CoreObject.ALIGN_BOTTOM);
							shopItem.setFlipState(_local1[3]);
							break;
						case GlobalGameConstants.STORE_WINDOW_TYPE:
						case GlobalGameConstants.WINDOW_TYPE:
						case GlobalGameConstants.BANNER_TYPE:
						case GlobalGameConstants.WALL_DECORATION_TYPE:
						case GlobalGameConstants.OUTSIDE_DECORATION_TYPE:
							shopItem.alignTo(_local1[2], -(_local1[3]), CoreObject.ALIGN_BOTTOM);
							shopItem.setFlipState(_local1[4]);
							break;
					}
					shopItem.uniqueID = _local1.uniqueID;
					if (shopItem.uniqueID == 0)
					{
						this.shopLayout.content = this.putUniqueIDs(this.shopLayout.content);
						this.placeItems();
						return;
					}
					if (shopItem.itemContent)
					{
						shopItem.itemContent.playContent(0, false, true);
						shopItem.itemContent.setOptimizedObject();
						this.add(shopItem);
					}
				}
			}
		}
		
		private function setDoors():void
		{
			var _local3:int;
			var _local4:int;
			var _local1:Array = DataUtils.getDoorsPosition(this.shopLayout);
			this.doorsPosX = null;
			this.doorsPosX = new Array();
			var _local2:int;
			while (_local2 < _local1.length)
			{
				_local3 = (_local1[_local2][0] - this.dataIndexOffset);
				_local4 = _local1[_local2][1];
				if (!((!(this.itemsList[_local3])) || (!(this.itemsList[_local3].hasOwnProperty("width")))))
				{
					this.doorsPosX.push(((_local4 + (this.itemsList[_local3].width / 2)) + this.x));
				}
				_local2++;
			}
		}
		
		private function getItemMoneyExpense():int
		{
			var _local3:Array;
			var _local4:Array;
			var _local5:int;
			var _local6:ItemInfo;
			var _local1:int;
			var _local2:Object = (((this.workingShopLayoutContent)!=null) ? this.workingShopLayoutContent : this.shopLayout.content);
			for each (_local3 in _local2)
			{
				if (ItemsConfig.getItemInfo(_local3[1]))
				{
					_local5 = ItemsConfig.getItemInfo(_local3[1]).priceInCoins;
					_local1 = (_local1 + _local5);
					if (_local3[0] == GlobalGameConstants.WALL_SHAPE_TYPE)
					{
						_local6 = ItemsConfig.getItemInfo(_local3[2]);
						if (_local6)
						{
							_local1 = (_local1 + _local6.priceInCoins);
						};
					};
				};
			};
			this.beauty = _local1;
			this.beautyLevel = 0;
			_local4 = ShopsConfig.getShopBeautyLevels(this.shopLayout.type, this.shopLayout.level);
			while (this.beauty >= _local4[this.beautyLevel])
			{
				this.beautyLevel++;
			}
			return (_local1);
		}
		
		private function putUniqueIDs(_arg1:Array):Array
		{
			var _local3:Array;
			var _local2:int;
			for each (_local3 in _arg1)
			{
				_local3.uniqueID = _local2;
				_local2++;
			}
			this.itemsList = new Array();
			return (_arg1);
		}
		
		private function showShop():void
		{
			var _local1:CoreObject;
			this.setBuildSpot(true);
			if (this.scaleY < 1)
			{
				TweenLite.to(this, 0.3, {
					"scaleY":1,
					"ease":Back.easeOut,
					"onComplete":this.createShopArea,
					"onCompleteParams":[true]
				})
				_local1 = new CoreObject("StarsAnim");
				_local1.alignTo(this.x, (this.y - 50));
				_local1.playContent(1, true);
				StreetManager.instance.add(_local1);
				SoundManager.playSound(SoundManager.POPUP_STARS);
			}
		}
		
		private function buildProgressComplete():void
		{
			
		}
	}
}
